package com.stone.elec.rename.config;

import java.util.Map;

import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Maps;
import lombok.Data;

@Data
public class ReNameConfig {
    public static final ReNameConfig reNameConfig = new ReNameConfig();

    /**
     * 项目跟目录
     */
    private String basePath = "D:\\work\\pigx-learn";

    private String projectName = "elec";

    private String oldProjectName = "pigx";

    private Pom pom = new Pom();
    private Yml yml = new Yml();
    private LogBack logBack = new LogBack();

    private Package aPackage = new Package();

    private SrcFile srcFile = new SrcFile();

    private JavaSource javaSource = new JavaSource();

    private Dockerfile dockerfile = new Dockerfile();

    private Css css = new Css();

    private Ftl ftl = new Ftl();

    private Factories factories = new Factories();
    private Txt txt = new Txt();

    private Properties properties = new Properties();

    private Xml xml = new Xml();

    private Md md = new Md();

    private License license = new License();

    private Vm vm = new Vm();

    private Sql sql = new Sql();

    private Html html= new Html();
    public ReNameConfig() {

        pom.getTemplate().put("pigx-common-bom", "parent",
            "<parent><artifactId>spring-cloud-dependencies-parent</artifactId>\n"
                + "\t\t<groupId>org.springframework.cloud</groupId>\n"
                + "\t\t<version>1.3.8.RELEASE</version>\n"
                + "\t\t<relativePath/></parent>");
        pom.getTemplate().put("pigx-common-bom", "build", "");

        pom.getReplace().put("com.pig4cloud", "com.stone");

        pom.getReplace().put("pigx", projectName);
        pom.getReplace().put("pig4cloud", "stone");
        pom.getReplace().put("https://www.pig4cloud.com", "http://www.baidu.com");

        yml.getReplace().put("pigx", projectName);
        yml.getReplace().put("pig", projectName);

        logBack.getReplace().put("pigx", projectName);
        logBack.getReplace().put("lengleng", "hy");

        aPackage.getReplace().put("pig4cloud", "stone");

        srcFile.getReplace().put("Pigx", "Elec");

        javaSource.getReplace().put("pig4cloud.pigx", "stone." + projectName);
        javaSource.getReplace().put("pig4cloud.elec", "stone." + projectName);
        javaSource.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        javaSource.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        javaSource.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        javaSource.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        javaSource.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        javaSource.getRemove().put("this list of conditions and the following disclaimer.", "");
        javaSource.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        javaSource.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        javaSource.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        javaSource.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        javaSource.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        javaSource.getRemove().put("this software without specific prior written permission.", "");
        javaSource.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        javaSource.getRemove().put("Author: hy (wangiegie@gmail.com)", "");




        javaSource.getReplace().put("lengleng", "hy");
        javaSource.getReplace().put("Sywd", "hy");

        javaSource.getReplace().put("Pigx", "Elec");
        javaSource.getReplace().put("PIGX", projectName.toUpperCase());
        javaSource.getReplace().put("PIG", projectName.toUpperCase());
        javaSource.getReplace().put("pig", projectName);
        dockerfile.getReplace().put("pig4cloud", "stone");
        dockerfile.getReplace().put("wangiegie@gmail.com", "1148577609@qq.com");
        dockerfile.getReplace().put("pigx", projectName);


        html.getReplace().put("pig4cloud.pigx", "stone." + projectName);
        html.getReplace().put("pig4cloud.elec", "stone." + projectName);
        html.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        html.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        html.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        html.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        html.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        html.getRemove().put("this list of conditions and the following disclaimer.", "");
        html.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        html.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        html.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        html.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        html.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        html.getRemove().put("this software without specific prior written permission.", "");
        html.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        html.getRemove().put("Author: hy (wangiegie@gmail.com)", "");



        css.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        css.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        css.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        css.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        css.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        css.getRemove().put("this list of conditions and the following disclaimer.", "");
        css.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        css.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        css.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        css.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        css.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        css.getRemove().put("this software without specific prior written permission.", "");
        css.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        css.getRemove().put("Author: hy (wangiegie@gmail.com)", "");

        xml.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        xml.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        xml.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        xml.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        xml.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        xml.getRemove().put("this list of conditions and the following disclaimer.", "");
        xml.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        xml.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        xml.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        xml.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        xml.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        xml.getRemove().put("this software without specific prior written permission.", "");
        xml.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        xml.getRemove().put("Author: hy (wangiegie@gmail.com)", "");
        xml.getReplace().put("pig4cloud.pigx", "stone.elec");

        properties.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        properties.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        properties.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        properties.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        properties.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        properties.getRemove().put("this list of conditions and the following disclaimer.", "");
        properties.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        properties.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        properties.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        properties.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        properties.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        properties.getRemove().put("this software without specific prior written permission.", "");
        properties.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        properties.getRemove().put("Author: hy (wangiegie@gmail.com)", "");

        properties.getReplace().put("pig4cloud.pigx", "stone." + projectName);
        properties.getReplace().put("pigx", projectName);
        properties.getReplace().put("pig4cloud.elec", "stone.elec");

        ftl.getReplace().put("PigX", "Stone");
        ftl.getReplace().put("https://pig4cloud.com", "https://baidu.com");
        ftl.getReplace().put("pig4cloud.com", "baidu.com");
        ftl.getReplace().put("pig4cloud", "Stone");
        ftl.getReplace().put("Pigx", "Stone");

        ftl.getReplace().put("wangiegie@gmail.com", "1148577609@qq.com");
        ftl.getReplace().put("pig4cloud@qq.com", "1148577609@qq.com");

        factories.getReplace().put("Pigx", "Elec");
        factories.getReplace().put("pig4cloud.pigx", "stone." + projectName);
        //pom.getReplace().put("172.17.0.111","");
        //pom.getReplace().put("http://172.17.0.111:2375","");

        txt.getReplace().put("www.pig4cloud.com", "www.baidu.com");
        txt.getReplace().put("Pig", "stone");

        md.getReplace().put("pigx", "stone");

        md.getReplace().put("pigX", "Stone");

        license.getReplace().put("pigX", "Stone");

        license.getReplace().put("pigx", "stone");

        license.getReplace().put("lengleng", "hy");


        license.getReplace().put("PigX", "Stone");

        license.getReplace().put("wangiegie@gmail.com", "1148577609@qq.com");


        vm.getRemove().put("Copyright (c) 2018-2025, lengleng All rights reserved.", "");
        vm.getRemove().put("Copyright (c) 2018-2025, hy All rights reserved.", "");
        vm.getRemove().put("Redistribution and use in source and binary forms, with or without", "");
        vm.getRemove().put("modification, are permitted provided that the following conditions are met:", "");
        vm.getRemove().put("Redistributions of source code must retain the above copyright notice,", "");
        vm.getRemove().put("this list of conditions and the following disclaimer.", "");
        vm.getRemove().put("Redistributions in binary form must reproduce the above copyright", "");
        vm.getRemove().put("notice, this list of conditions and the following disclaimer in the", "");
        vm.getRemove().put("documentation and/or other materials provided with the distribution.", "");
        vm.getRemove().put("Neither the name of the pig4cloud.com developer nor the names of its", "");
        vm.getRemove().put("contributors may be used to endorse or promote products derived from", "");
        vm.getRemove().put("this software without specific prior written permission.", "");
        vm.getRemove().put("Author: lengleng (wangiegie@gmail.com)", "");
        vm.getRemove().put("Author: hy (wangiegie@gmail.com)", "");
        vm.getReplace().put("pig4cloud.pigx","stone.elec");


        sql.getReplace().put("PigX", "Elec");

        sql.getReplace().put("Pigx", "Elec");

        sql.getReplace().put("pigX", "Elec");
        sql.getReplace().put("pig4cloud.com", "baidu.com");

        sql.getReplace().put("pig4cloud.elec", "stone.elec");

        sql.getReplace().put("pig4cloud.pigx", "stone.elec");

        sql.getReplace().put("pigx",projectName);

        sql.getReplace().put("pig", "elec");
    }
    @Data
    public class Html {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }
    @Data
    public class Sql {
        private Map<String, String> replace = Maps.newHashMap();
    }
    @Data
    public class Vm {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }
    @Data
    public class License {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Md {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Properties {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }

    @Data
    public class Xml {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }

    @Data
    public class Txt {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Factories {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Ftl {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Css {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }

    @Data
    public class Dockerfile {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class JavaSource {
        private Map<String, String> replace = Maps.newHashMap();
        private Map<String, String> remove = Maps.newHashMap();
    }

    @Data
    public class SrcFile {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Package {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class LogBack {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Yml {
        private Map<String, String> replace = Maps.newHashMap();
    }

    @Data
    public class Pom {
        private Map<String, String> replace = Maps.newHashMap();

        private HashBasedTable<String, String, String> template = HashBasedTable.create();
    }

}
